<%@ page import="com.sptpc.exam.model.Question" %>
<%@ page import="java.util.List" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ include file="header.jsp"%>

<form method="post" action="score.do">
    <c:forEach items="${sessionScope.questions}" var="q" varStatus="i">
        ${i.count}.${q.question}<br>
        <c:set var="opis" value='${["a","b","c","d"]}'/>
        <c:forEach items="${q.options}" var="op" varStatus="j">
            <input type="radio" name="${q.id}" value="${opis[j.count - 1]}"/>${j.count - 1}. ${op} <br>
        </c:forEach>
    </c:forEach>
    <input type="submit" value="交卷">
</form>
</body>
</html>
